<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//注册页
Route::get('/register','RegisterController@index');
//注册行为
Route::post('/register','RegisterController@register');
//登陆页
Route::get('/login','LoginController@index');
//登陆行为
Route::post('/login','LoginController@login');
//登出
Route::get('logout','LoginController@logout');
//个人设置页
Route::get('/me/setting','SettingController@index');
Route::post('/settiing','SettingController@sett');
//显示文章列表页
Route::get('/posts','\App\Http\Controllers\PostsController@index');
//写文章显示页面
Route::get('/posts/create','PostsController@create');
//写文章逻辑页面
Route::post('/posts','PostsController@xie');
//搜索
Route::get('/posts/search','PostsController@search');
//显示详情页面
Route::get('/posts/{post}','PostsController@cate');
//删除详情页面
Route::get('/posts/{post}/del','PostsController@del');
//文章编辑页面显示
Route::get('/posts/{post}/edit','PostsController@edit');
//文章编辑页面逻辑实现
Route::put('/posts/{post}','PostsController@update');

//提交评论
Route::post('/posts/{post}/comment','PostsController@comment');
//赞
Route::get('/posts/{post}/zan','PostsController@zan');
Route::get('/posts/{post}/unzan','PostsController@unzan');